import request from "@/utils/request";
import qs from "qs";
// 获取绘画列表 status（0，1）是正在绘画的操作 ，2 是成功
export const getMyMjList = (data: Object) => {
  return request({
    url: "/mj/getMyMjList",
    method: "post",
    data: qs.stringify(data),
    headers: { "content-type": "application/x-www-form-urlencoded" },
  });
};
// 改变绘画
export const changeMjTask = (data: Object) => {
  return request({
    url: "/mj/changeMjTask",
    method: "post",
    data: qs.stringify(data),
  });
};
// 创建ai绘画
export const createMjTask = (data: Object) => {
  console.log("=========", data);
  return request({
    url: "/mj/createMjTask",
    method: "post",
    data: qs.stringify(data),
  });
};
// 翻译，联想
export const translateTask = (data: Object) => {
  return request({
    url: "/mj/mjPrompts",
    method: "post",
    data: qs.stringify(data),
  });
};
// 进度条
export const getProgress = (data: Object) => {
  return request({
    url: "/mj/getMjByTaskId",
    method: "get",
    params:data
  });
};
// 删除图片
export const deleteImage = (data:any) => {
  return request({
    url: `/mj/deleteMJTaskId/${data}`,
    method: "delete",
  });
};
